<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<title>后台用户</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
		<link rel="shortcut icon" href="favicon.ico">
		<link href="/Application/Admin/View//Public/static/css/bootstrap.min.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/font-awesome.min.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/plugins/iCheck/custom.css" rel="stylesheet">
		
		<link href="/Application/Admin/View//Public/static/css/animate.css" rel="stylesheet">
		<link href="/Application/Admin/View//Public/static/css/style.css" rel="stylesheet">
	</head>

	<body class="fixed-sidebar full-height-layout gray-bg">
		<div id="wrapper">
			<!--左侧导航开始-->
			<nav class="navbar-default navbar-static-side" role="navigation">
	<div class="nav-close"><i class="fa fa-times-circle"></i></div>
	<div class="sidebar-collapse">
		<ul class="nav" id="side-menu">
			<li class="nav-header">
				<div class="dropdown profile-element">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">
						<span class="clear">
                                    <span class="block m-t-xs" style="font-size:20px;">
                                        <i class="fa fa-area-chart"></i>
                                        <strong class="font-bold">管理系统</strong>
                                    </span>
						</span>
					</a>
				</div>
				<div class="logo-element">管理系统</div>
			</li>
			<li>
				<a class="J_menuItem" href="<?php echo U('index/index');?>">
					<i class="fa fa-home"></i>
					<span class="nav-label">主页</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('member/index');?>">
					<i class="fa fa-user"></i>
					<span class="nav-label">会员管理</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('admin/index');?>">
					<i class="fa fa-users"></i>
					<span class="nav-label">后台用户</span>
				</a>

			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('list/index');?>">
					<i class="fa fa-folder"></i>
					<span class="nav-label">应用列表</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Config/index');?>">
					<i class="fa fa-cogs"></i>
					<span class="nav-label">网站配置</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('jubao/index');?>">
					<i class="fa fa-envelope-o"></i>
					<span class="nav-label">举报信箱</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('ticket/index');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">工单列表</span>
				</a>
			</li>




			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Articles/advertisement');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">广告</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Download/index');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">套餐设置</span>
				</a>
			</li>
		</ul>
	</div>
</nav>
			<!--左侧导航结束-->
			<!--右侧部分开始-->
			<div id="page-wrapper" class="gray-bg dashbard-1" style="height: auto;">
				<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
	<ul class="nav navbar-top-links navbar-right">
		<li class="dropdown">
			<a href="<?php echo U('login/delcache');?>" class="dropdown-toggle count-info"><i class="fa fa-check"></i> 清除缓存</a>
		</li>
		<li class="dropdown">
			<a href="<?php echo U('login/logout');?>" class="dropdown-toggle count-info"><i class="fa fa-power-off"></i> 退出</a>
		</li>
	</ul>
</nav>
				<div class="row J_mainContent" id="content-main">
					<div class="col-sm-12">
						<div class="ibox float-e-margins">
							<div class="ibox-content">
								<div class="row">
									<a class="btn btn-success" href="<?php echo U('admin/add');?>">
										<i class="fa fa-user-plus"></i> 添加用户
									</a>
									<a class="btn btn-info" href="<?php echo U('admin/index');?>">
										所有用户</a>
								</div>
								<div class="table-responsive">
									<table class="table table-striped">
										<thead>
											<tr>

												<!--<th></th>-->
												<th>ID</th>
												<th>用户名</th>
												<th>注册时间</th>
												<th>到期时间</th>
												<th>登录IP</th>
												<th>类型</th>
												<th>状态</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody>
											<?php if(is_array($member)): foreach($member as $key=>$v): ?><tr>
													<td><input type="checkbox" class="i-checks" name="hobby[]" value="<?php echo ($v["id"]); ?>"><?php echo ($v["id"]); ?></td>
													<td><?php echo ($v["username"]); ?>
														<!-- <?php if($v["isvip"] == 0): ?><font color="#FF0000">vip</font><?php endif; ?> -->
														<!-- <a href="<?php echo U('list/index',array('fid'=>$v['id']));?>">查看应用</a> -->
													</td>
													<!-- <td><?php echo ($v["appnum"]); ?>个</td> -->
													<td><?php echo (date("Y/m/d",$v["create_time"])); ?></td>
													<td><?php echo (date("Y/m/d",$v["tianshu"])); ?></td>
													<td><?php echo ($v["login_ip"]); ?></td>
													<td>
														<?php if($v["type"] == 1): ?><span class="label label-success">会员</span>
															<?php elseif($v["type"] == 2): ?><span class="label label-danger">管理员</span><?php endif; ?>
													</td>
													<td>
														<?php if($v["status"] == 1): ?>正常
															<?php else: ?><span style="color:red">禁用</span><?php endif; ?>
													</td>
													<?php if($v["status"] == 1): ?><td>
															<a href="<?php echo U('admin/update',array('id'=>$v['id']));?>">编辑</a> |
															<a href="<?php echo U('admin/delete',array('id'=>$v['id']));?>" style="color:red;" onclick="javascript:return del('禁用后用户将不能登陆后台!\n\n请确认!!!');">禁用</a> |
															<a href="<?php echo U('admin/alldel',array('id'=>$v['id']));?>" style="color:red;" onclick="javascript:return del('删除后用户将不能登陆后台!\n\n请确认!!!');">删除</a>
														</td>
														<?php else: ?>
														<td>
															<a href="<?php echo U('admin/update',array('id'=>$v['id']));?>">编辑</a> |
															<a href="<?php echo U('admin/delete',array('id'=>$v['id']));?>" style="color:#50AD1E;">启用</a> |
															<a href="<?php echo U('admin/alldel',array('id'=>$v['id']));?>" style="color:red;" onclick="javascript:return del('删除后用户将不能登陆后台!\n\n请确认!!!');">删除</a>
														</td><?php endif; ?>
												</tr><?php endforeach; endif; ?>
										</tbody>
									</table>
								</div>

							</div>
						</div>
					</div>
				</div>
			</div>
			<!--右侧部分结束-->
		</div>

		<!-- 全局js -->
		<script src="/Application/Admin/View//Public/static/js/jquery.min.js"></script>
		<script src="/Application/Admin/View//Public/static/js/bootstrap.min.js"></script>
		<script src="/Application/Admin/View//Public/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
		<script src="/Application/Admin/View//Public/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<script src="/Application/Admin/View//Public/static/js/plugins/layer/layer.min.js"></script>

		<!-- 自定义js -->
		<script src="/Application/Admin/View//Public/static/js/hAdmin.js"></script>

		<!-- 第三方插件 -->
		<script src="/Application/Admin/View//Public/static/js/plugins/pace/pace.min.js"></script>
		
		<!-- iCheck -->
		<script src="/Application/Admin/View//Public/static/js/plugins/iCheck/icheck.min.js"></script>

		</script>
	</body>

</html>
<script>
			$(document).ready(function() {
				$('.i-checks').iCheck({
					checkboxClass: 'icheckbox_square-green',
					radioClass: 'iradio_square-green',
				});
				var checkAll = $('#quanxuan'); //全选的input
				var checkboxs = $('.i-checks'); //所有单选的input

				checkAll.on('ifChecked ifUnchecked', function(event) {
					if(event.type == 'ifChecked') {
						checkboxs.iCheck('check');
					} else {
						checkboxs.iCheck('uncheck');
					}
				});
				checkboxs.on('ifChanged', function(event) {
					if(checkboxs.filter(':checked').length == checkboxs.length - 1) {
						checkAll.prop('checked', true);
					} else {
						checkAll.prop('checked', false);
					}
					checkAll.iCheck('update');
				})

			});
		</script>